<div class="container">
    <div class="row">
        <div class="col-md-6 col-md-offset-1 col-xm-6">
            <form action="" method="post" novalidate>
           {% csrf_token %}
                {% for field in form %}
                <div style="position: relative">
                    <label for="">{{ field.label }}</label>
                    {{ field }}
                    <span class="error pull-right">{{ field.errors.0 }}</span>
                    {% if field.is_pop %}
                    <a onclick="pop('{{ field.url }}')"><span style="font-size: 20px; position:absolute; right: -30px; top: 24px" class="pull-right">+</span></a>
                    {% endif %} 
                </div>
                {% endfor %}
            <button type="submit" class="btn btn-default pull-right">提交</button>
            </form>
        </div>
    </div>
</div>

<script>
    function pop(fieldurl) {
        window.open(fieldurl, "", "width=700, height=500, top=100, left = 200")
    }
    
</script>
